package com.example.ck.controller.Admin;

import com.example.ck.service.ProjectService;
import com.example.ck.vo.ResultVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 项目申报表(Project)表控制层
 *
 * @author makejava
 * @since 2024-05-01 12:14:44
 */
@Slf4j
@RestController
@RequestMapping("project")
@CrossOrigin
public class ProjectControllerAdmin {
    @Autowired
    private ProjectService projectService;

    /**
     * 获取所有项目
     */
    @GetMapping("")
    public ResultVo getAllProject() {
        return new ResultVo(projectService.findAll());
    }

}

